home *** CD-ROM | disk | FTP | other *** search
Wrap
property startBlend property StartFadePoint property EndFadePoint on exitFrame me -- provides the trigger for the blend updates sendSprite (the spritenum of me, #blendit) end on blendSprite which, what -- does the blending :) set the blend of sprite which = what updatestage end on blendit me set dv = abs((the locV of sprite the spriteNum of me) - the mousev) set dH = abs((the locH of sprite the spriteNum of me) - the mouseh) set distance = sqrt( dV * dV + dH * dH ) if distance < EndFadePoint then blendSprite the spriteNum of me,100 exit end if if distance < StartFadePoint then set percentage = (distance*100/StartFadePoint) set blendToValue = (100-percentage) if blendToValue < startBlend then set blendToValue = startBlend blendSprite the spriteNum of me,blendToValue else blendSprite the spriteNum of me,startBlend end if updatestage end on getPropertyDescriptionList set p_list = [¨ #startBlend: [ #default:0, #format:#integer, #comment:"Initial Blend",#range: [#min:0,#Max:100]] ,¨ #StartFadePoint: [ #default:100, #format:#integer, #comment:"Trigger Point", #range:[#min:0,#Max:1500]],¨ #EndFadePoint: [ #default:0, #format:#integer, #comment:"End Trigger Point", #range:[#min:0,#Max:1500]] ¨ ] return p_list end on getBehaviorDescription return "Creates sprites that fade in and out (using the sprite blend property) depending how far they are from the mouse. " &return&return&¨ "Try different inks for your sprites - different images require different settings. Also, there appears to be a bug in Director 6 that prevents sprites with a blend of 0 from being totally hidden. " end